package day019.ioStream;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileInputStreamDemo3 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("D:\\ideaProjects\\javase_code\\study-practice\\" +
                "src\\day019\\ioStream\\day019_demo\\dog.jpg");
        FileOutputStream fos = new FileOutputStream("D:\\ideaProjects\\javase_code\\study-practice\\" +
                "src\\day019\\ioStream\\day019_demo\\test1.jpg");
        int by;
        while ((by = fis.read()) != -1) {
            fos.write(by);
        }

        fis.close();
        fos.close();
    }
}
